<template>
  <el-container style="height: 100%; border: 1px solid #eee">
    <el-aside  :width="aside_width" style="background-color: rgb(238, 241, 246);height: 100%;margin-left: -1px">
      <Aside :iScollapse="this.iScollapse"></Aside>
    </el-aside>

    <el-container style="height: 100%">
      <el-header style="text-align: right; font-size: 12px;height: 100%;border-bottom: rgba(168,168,168,0.3) 1px solid">
        <Header @submit="submit" :iScollapse="this.iScollapse"></Header>
      </el-header>
      <el-main style="height: 100%">
        <Main></Main>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
import Aside from "@/components/Aside.vue";
import Header from "@/components/Header.vue";
import Main from "@/components/Main.vue";


export default {
  name: "IndexPage",
  components: {Header, Aside,Main},
  data(){
    return{
      iScollapse:false,
      aside_width:'200px'
    }
  },
  methods:{
    submit(){
        this.iScollapse= !this.iScollapse;
        if(this.iScollapse){
          this.aside_width='64px'
        }else{
          this.aside_width='200px'
        }
    }
  }

}
</script>

<style scoped>
.el-header {
  /*background-color: #B3C0D1;*/
  color: #333;
  line-height: 60px;
}
.el-main{
  padding: 5px;
}
.el-aside {
  color: #333;
}
</style>